package com.dididoctor.patient.Activity.Empty;

import android.content.Intent;
import android.view.View;

import com.dididoctor.patient.Activity.Inquiry.InquiryActivity;
import com.dididoctor.patient.Bean.DiaeasesLitapal;
import com.dididoctor.patient.Dialog.DiseaseListDialog;
import com.dididoctor.patient.MV.EduActivity;
import com.dididoctor.patient.R;
import com.dididoctor.patient.Receive.xmppPresenter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by boy on 2016/4/27.
 */
public class EmptyActivity extends EduActivity {
    private List<DiaeasesLitapal> litapals = new ArrayList<>();
    private String hosId, recId, name, sign;
    private String userid, token;
    private xmppPresenter presenter;
    private String doctorid, accId;

    @Override
    public void init() {
        //24z中小病
        litapals = DiaeasesLitapal.getdisarases();
        DiseaseListDialog diseaseListDialog = new DiseaseListDialog(EmptyActivity.this, litapals, new DiseaseListDialog.onItemClickListener() {
            @Override
            public void itemClick(int position) {
                DiaeasesLitapal litapal = litapals.get(position);
                String disname = litapal.getName();
                String disid = litapal.getDisId();
                Intent intent = new Intent(EmptyActivity.this, InquiryActivity.class);
                intent.putExtra("disname", disname);
                intent.putExtra("disid", disid);
                intent.putExtra("doctorId", doctorid);
                intent.putExtra("hosId", hosId);
                intent.putExtra("isCmp", "1");
                intent.putExtra("accId", accId);
                intent.putExtra("sign", sign);
                intent.putExtra("name", name);
                startActivity(intent);
                finish();
            }

            @Override
            public void setfinis() {
                finish();
            }
        });
        diseaseListDialog.show();

    }

    @Override
    public void onClickEvent(View view) {

    }

    @Override
    public void setContentLayout() {
        setContentView(R.layout.activity_empty);
        recId = getIntent().getStringExtra("recId");
        hosId = getIntent().getStringExtra("hosId");
        userid = getIntent().getStringExtra("userid");
        token = getIntent().getStringExtra("token");
        doctorid = getIntent().getStringExtra("doctorid");
        accId = getIntent().getStringExtra("accId");
        name = getIntent().getStringExtra("name");
        sign = getIntent().getStringExtra("sign");
    }

//    public boolean onKeyDown(int keyCode, KeyEvent event) {
//        // TODO Auto-generated method stub
//        if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
//        }
//        return super.onKeyDown(keyCode, event);
//    }
}
